#ifndef __SLAM_ORB_HPP__
#define __SLAM_ORB_HPP__

#include <opencv2/highgui.hpp>
#include <opencv2/features2d/features2d.hpp>

namespace slam
{

typedef struct _orbAttr
{
    int nfeatures;
    float scaleFactor;
    int nlevels;
    int edgeThreshold;
    int firstLevel;
    int wta_k;
    cv::ORB::ScoreType scoreType;
    int patchSize;
    int fastThreshold;
}OrbAttr;

class ORB
{

public:
    ORB():outputArray_(cv::Mat()) {}
    ~ORB() {}

    bool Init(OrbAttr& attrInfo);
    bool Extract(cv::Mat image);
    bool Clean();

    void DrawKeyPoints(void);

    std::vector<cv::KeyPoint> KeyPoint(void) const;

private:
    cv::Mat src_;
    cv::Ptr<cv::ORB> orbDetector_;
    OrbAttr attr_;
    std::vector<cv::KeyPoint> keyPointVec_;
    cv::Mat outputArray_;

}; // class ORB

} // namespace slam

#endif // __SLAM_ORB_HPP__